<#import "/spring.ftl" as spring/>
<#list materialList as user>
<tr onclick='selectFunction(this)'>
    <td><p style="width:30px">${ user_index+1}</p></td>
    <td><p style="width:95px">
        <#if user.materialFile?exists &user.materialFile!=''>
            <img src='${user.materialFile!}'>
        <#else>
            <img src='/ls-erp/static/images/pic-none.jpg'>
        </#if>
    </p></td>
    <td><p style="width:80px">${user.materialCode!}<br>${user.materialNameCN!}</p></td>
    <td><p style="width:45px">${user.materialSpec!}</p></td>
    <td><p style="width:60px">${dict.getDictName(user.materialSpecUnitCD)}</p></td>
    <td><p style="width:60px">${user.materialColor!}</p></td>
    <td><p style="width:75px">${user.materialComposition!}</p></td>
    <td><p style="width:75px">${dict.getDictName(user.materialCategory)}</p></td>
    <td><p style="width:75px">${dict.getDictName(user.materialUseType)}</p></td>
    <td><p style="width:75px">${user.materialQuantity!}</p></td>
    <td><p style="width:75px">${user.materialAlertQuantity!}</p></td>
    <td><p style="width:75px"><#if user.createDate??>${(user.createDate)?string("yyyy-MM-dd")}</#if></p></td>
    <input type ='hidden' class = 'materialID' value = '${user.materialID?c}' disabled='disabled'>
    <#if user.materialFile?exists&user.materialFile!=''>
        <input type ='hidden' class = 'materialFile' value = '${user.materialFile}' disabled='disabled'>
    <#else>
        <input type ='hidden' class = 'materialFile' value = '/ls-erp/static/images/pic-none.jpg' disabled='disabled'>
    </#if>
    <input class="materialCode" type = "hidden" value="${user.materialCode!}">
    <input class="materialNameCN" type = "hidden" value="${user.materialNameCN!}">
    <input class="materialColor" type = "hidden" value="${user.materialColor!}">
    <input class="materialSpecUnitCD" type = "hidden" value="${user.materialSpecUnitCD!}">
    <input class="materialFile" type = "hidden" value="${user.materialFile!}">
    <input class = "materialSpec" type = "hidden" value = "${(user.materialSpec!)}">
    <input class = "materialAlertQuantity" type = "hidden" value = "${user.materialAlertQuantity!}">
    <#if user.purchaseReserveQuantity??>
    	<input class = "purchaseReserveQuantity" type = "hidden" value = "${(user.purchaseReserveQuantity!)}">
    <#else>
        <input class = "purchaseReserveQuantity" type = "hidden" value = "">
    </#if>
    <#if user.purchaseUnitPrice??>
    	<input class = "purchaseUnitPrice" type = "hidden" value = "${user.purchaseUnitPrice!}">
    <#else>
        <input class = "purchaseUnitPrice" type = "hidden" value = "">
    </#if>
    <#if user.createDate??>
    	<input class = "materialAlertDate" type = "hidden" value = "${(user.createDate)?string("yyyy-MM-dd")}">
    <#else>
        <input class = "materialAlertDate" type = "hidden" value = "">
    </#if>
</tr>
</#list>